from psp2d import Font
        
_loaded_fonts = {} 

def get( fnt_name ):
    if fnt_name in _loaded_fonts:
        return _loaded_fonts[ fnt_name ]
    full_path = '.'.join( [__name__, fnt_name] )
    dotcount = full_path.count('.') - 1
    full_path = full_path.replace('.', '/', dotcount)
    fnt = Font(full_path)
    if fnt:
        _loaded_fonts[ fnt_name ] = fnt
        return fnt
    else:
        return None